/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.entity;

public class BlockAddrs extends CommonEntity {
    private static final long serialVersionUID = -6818204014676622300L;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column block_addrs_*.b_number
     *
     * @mbg.generated
     */
    private Long bNumber;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column block_addrs_9.block_hash
     *
     * @mbg.generated
     */
    private String blockHash;


    private String blockTimestamp;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column block_addrs_*.txcount
     *
     * @mbg.generated
     */
    private Integer txcount;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column block_addrs_*.addrs
     *
     * @mbg.generated
     */
    private String addrs;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column block_addrs_*.b_number
     *
     * @return the value of block_addrs_*.b_number
     * @mbg.generated
     */
    public Long getbNumber() {
        return bNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column block_addrs_*.b_number
     *
     * @param bNumber the value for block_addrs_*.b_number
     * @mbg.generated
     */
    public void setbNumber(Long bNumber) {
        this.bNumber = bNumber;
    }

    public String getBlockHash() {
        return blockHash;
    }

    public void setBlockHash(String blockHash) {
        this.blockHash = blockHash;
    }

    public String getBlockTimestamp() {
        return blockTimestamp;
    }

    public void setBlockTimestamp(String blockTimestamp) {
        this.blockTimestamp = blockTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column block_addrs_*.txcount
     *
     * @return the value of block_addrs_*.txcount
     * @mbg.generated
     */


    public Integer getTxcount() {
        return txcount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column block_addrs_*.txcount
     *
     * @param txcount the value for block_addrs_*.txcount
     * @mbg.generated
     */
    public void setTxcount(Integer txcount) {
        this.txcount = txcount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column block_addrs_*.addrs
     *
     * @return the value of block_addrs_*.addrs
     * @mbg.generated
     */
    public String getAddrs() {
        return addrs;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column block_addrs_*.addrs
     *
     * @param addrs the value for block_addrs_*.addrs
     * @mbg.generated
     */
    public void setAddrs(String addrs) {
        this.addrs = addrs == null ? null : addrs.trim();
    }


    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table block_addrs_*
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BlockAddrs other = (BlockAddrs) that;
        return (this.getbNumber() == null ? other.getbNumber() == null : this.getbNumber().equals(other.getbNumber()))
                && (this.getBlockHash() == null ? other.getBlockHash() == null : this.getBlockHash().equals(other.getBlockHash()))
                && (this.getBlockTimestamp() == null ? other.getBlockTimestamp() == null : this.getBlockTimestamp().equals(other.getBlockTimestamp()))
                && (this.getTxcount() == null ? other.getTxcount() == null : this.getTxcount().equals(other.getTxcount()))
                && (this.getAddrs() == null ? other.getAddrs() == null : this.getAddrs().equals(other.getAddrs()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table block_addrs_9
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getbNumber() == null) ? 0 : getbNumber().hashCode());
        result = prime * result + ((getBlockHash() == null) ? 0 : getBlockHash().hashCode());
        result = prime * result + ((getBlockTimestamp() == null) ? 0 : getBlockTimestamp().hashCode());
        result = prime * result + ((getTxcount() == null) ? 0 : getTxcount().hashCode());
        result = prime * result + ((getAddrs() == null) ? 0 : getAddrs().hashCode());
        return result;
    }

    public BlockAddrs() {
    }

    public BlockAddrs(Long bNumber, String blockHash, String blockTimestamp, Integer txcount, String addrs) {
        super();
        this.bNumber = bNumber;
        this.blockHash = blockHash;
        this.blockTimestamp = blockTimestamp;
        this.txcount = txcount;
        this.addrs = addrs;
    }
}